class State_ {

    constructor() {
        if (arguments && arguments[0]) {
            this.money = arguments[0];
        }else{
            this.money = 1000;
        }
    }

    getMoney() {
        return this.money;
    }

    buy() {
        this.money -= 100;
    }

    reset(number) {
        this.money = number;
    }
}

const State = new State_(10000);

module.exports = State;
